﻿using System.Windows.Controls;
using SilverlightHVP.ViewModel;

namespace SilverlightHVP.View
{
   public partial class Viewer : UserControl
   {
      private SmoothStreamFramer framer;
      public Viewer()
      {
         InitializeComponent();
         Loaded += new System.Windows.RoutedEventHandler( Viewer_Loaded );
         framer = new SmoothStreamFramer();
      }

      void Viewer_Loaded( object sender, System.Windows.RoutedEventArgs e )
      {
         // this will be done through binding
        
         this.LayoutRoot.Children.Add( framer );
      }

      
      public SmoothStreamFramer SetViewModel( ViewerViewModel viewerViewModel )
      {
         return framer;
      }

   }
}
